#include <iostream>
#include <cmath>

#define B_string 'B'
#define I_string 'I'
#define F_string 'F'

using namespace std;

struct node{
	char typeFlag;
	int left_site;
	int right_site;
	node * left;
	node * right;
};

int getFlag(char * str, int left_site, int right_site);

void buildTree(node * root, char * str);

void postorderTraversal(node * root);

int main(){
	int i;
	cin >> i;

	node * root = new node;
	int length = pow(2, i);

	char * str = new char[length];
	for (int i = 0; i < length; i++)
		cin >> str[i];

	root->left_site = 0;
	root->right_site = length - 1;
	root->typeFlag = getFlag(str, root->left_site, root->right_site);
	root->left = root->right = NULL;
	buildTree(root, str);
	postorderTraversal(root);
	cout << endl;
}

int getFlag(char * str, int left_site, int right_site){
	char key = str[left_site];
	for (int i = left_site; i <= right_site; i++)
	if (str[i] != key) return F_string;
	if (key == '1') return I_string;
	if (key == '0') return B_string;
}

void buildTree(node * root, char * str){
	if (root->left_site != root->right_site) {
		root->left = new node;
		root->right = new node;
		root->left->left_site = root->left_site;
		root->left->right_site = (root->left_site + root->right_site) / 2;
		root->left->typeFlag = getFlag(str, root->left->left_site, root->left->right_site);
		root->right->left_site = root->left->right_site + 1;
		root->right->right_site = root->right_site;
		root->right->typeFlag = getFlag(str, root->right->left_site, root->right->right_site);
		root->left->left = root->left->right = root->right->left = root->right->right = NULL;
		buildTree(root->left, str);
		buildTree(root->right, str);
	}
}

void postorderTraversal(node * root){
	if(root != NULL){
		postorderTraversal(root->left);
		postorderTraversal(root->right);
		cout << root->typeFlag;
	}
}
